package com.fau.wmbj.server.utils;

import org.hibernate.dialect.MySQL8Dialect;

/**
 * 重写外键生成规则（mysql8.0）
 *
 * @author jiawei
 * @version 1.0
 * @datetime 2023-03-08 16:43
 */
public class MySQL8WithoutFK extends MySQL8Dialect {
    @Override
    public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey) {
        //自动生产表设置外键为空
        // return "";
        return super.getAddForeignKeyConstraintString(constraintName, foreignKey, referencedTable, primaryKey, false);
    }
}
